package com.xxxcompany.wordbook.dao;




import java.sql.SQLException;

import org.junit.jupiter.api.Test;

import com.xxxcompany.wordbook.entity.User;

import junit.framework.TestCase;

class IUserDAOTest {
	
	IUserDAO userDAO = new UserDAOImpl();


	@Test
	void testInsert() throws SQLException {
		
		User u = new User(-1,"zs","123456","张三","zs@qq.com");
		int result = userDAO.insert(u);
		
		// 断言
		TestCase.assertTrue(result==1);
	}

	@Test
	void testFind() throws SQLException {
		
		User u = userDAO.find("zs", "123456");
		
		TestCase.assertNotNull(u);
	}

}